package hanshet;

import java.util.HashSet;

public class Demo {
    public static void main(String[] args) {
        HashSet<Student>list = new HashSet<>();
        Student s1 = new Student("xiaomei",23);
        Student s2 = new Student("xiaozhang",25);
        Student s3 = new Student("xiaomei",23);
        list.add(s1);
        list.add(s2);
        list.add(s3);
        for (Student student : list) {
            System.out.println(student);
        }
    }
}
